import { RouteRecordRaw } from 'vue-router'
export const Layout = () => import('@/layout/index.vue')

export const courseRoutes: RouteRecordRaw[] = [
  {
    path: '/course',
    component: Layout,
    redirect: '/course/courseGoods',
    meta: { title: '课程商品', icon: '' },
    children: [
      {
        path: 'courseGoods',
        component: () => import('@/views/course/courseGoods.vue'),
        name: 'CourseGoods',
        meta: {
          title: '课程商品',
          icon: '',
          affix: false,
          keepAlive: true,
        },
      },
      {
        path: 'courseCreateUpdate',
        component: () => import('@/views/course/courseCreateUpdate.vue'),
        name: 'CourseCreateUpdate',
        meta: {
          title: '课程添加/编辑',
          icon: '',
          affix: false,
          keepAlive: true,
          hidden: true,
          activeMenu: '/course/courseGoods'
        },
      },
      {
        path: 'courseHome',
        component: () => import('@/views/course/courseHome.vue'),
        name: 'CourseHome',
        meta: {
          title: '课程主页',
          icon: '',
          affix: false,
          keepAlive: true,
          hidden: true,
          activeMenu: '/course/courseGoods'
        },
      },
    ],
  },
]
